{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<style>
.suglist li{
		cursor: pointer; 
	}
.suglist li:hover{
		background: #f3f3f3;
	}
	.ul_tab {
            height: 40px;
            background-color: #e5e5e5;
    		border-bottom: 1px solid #e4e7ed;
        }

        .ul_tab li {
            position: relative;
            float: left;
            width: 112px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            cursor: pointer;
            margin-left: -1px;
        }

        .ul_tab span {
            position: absolute;
		    right: 0;
		    top: 13px;
		    background: #636363;
		    width: 1px;
		    height: 14px;
		    overflow: hidden;
        }
        .products {
            width: 98%;
		    height: 100%;
		    padding: 20px;
		    margin-top: -9px;
        }

        .products .main {
            float: left;
            display: none;
            width: 100%;
        }

        .products .main.selected {
            display: block;
        }
        .ul_tab li.active {
            border-bottom: 1px solid #fff;
		    background-color: #636363;
		    border-right: 1px solid #ddd;
		    border-left: 1px solid #ddd;
		    color: white !important;
        }
         .active a {
		    color: white;
		}
        
		/*.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active {
		    color: #636363;
		    background-color: #e5e5e5;
		    border-color: #e5e5e5;
		}*/
		.table-bg thead th {
		     background-color: #ffffff; 
		}
		table tbody tr:hover{
			background-color: #f5f7fa !important; 
		}
		.text{
			height: 44px;
		}
		.text th{
			color: #909399;
			font-size: 14px;
		}
		.text-c td{
			font-size: 14px;
		}
		.tab-item a{
			display: inline-block;
			width: 100%;
			height: 100%;
		}
		a:hover{
			
			text-decoration: none;
		}
		.tab-item a{
			color: #333;	
		}
		
		.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#e5e5e5}
		.text th {
		    color: #909399;
		    font-size: 14px;
		   
		}
		.navbar {
		    background: #3f3f3f;
		}
		/*.text-c td {
		    color: #909399;
		}
		.text-c td a {
		    color: #909399;
		}*/
		
		.dataTables_wrapper .dataTables_paginate .paginate_button:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
		    background: #e5e5e5;
		    color: #636363;
		}
</style>
<body>
  <nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
     运行管理
    <span class="c-gray en">&gt;</span>
    消息推送
    <span class="c-gray en">&gt;</span>
    查看会员
    <a class="btn btn-success radius r"
      style="line-height: 1.6em; margin-top: 3px"
      href="javascript:location.replace(location.href);" title="刷新">
      <i class="Hui-iconfont">&#xe68f;</i>
    </a>
  </nav>
  <div style="padding:20px;height:30px;">
  	
  		
	 	
	 	<div class="products">
	        <div class="main selected">
	          
	              <div class="page-container dataTables_wrapper">
				      <div id="tab-system" class="HuiTab">
				        <div class="tabCon">
				          <div class="mt-20">
				            <table
				              class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
				              <thead>
				                <tr class="text-c text">
				                  <th>ID</th>
				                  <th>用户名</th>
				                  <th>会员等级</th>
				                  <th>上级代理</th>
				                  <th>注册来源</th>
				                  <th>账户余额</th>
				                  <th>状态</th>
				                  <th>注册时间</th>
				                  <th>登陆时间</th>
				                  <th>登陆次数</th>
				                  
				                  <th>充值总额</th>
				                  
				                  <th>提现总额</th>
				                  <th>优惠总额</th>
				                  <th>盈亏</th>
				                </tr>
				              </thead>
				              <tbody>
				              {volist name="query" id="item"}
				                <tr class="text-c">
				                  <td>{$item.uid}</td>
				                  <td>{$item.username}
				                 </td>
				                  <td>{$item.hy_name}</td>
				                  
				                  <td style='text-align:center'>
				                  {if condition="!empty($item.tjr)"}
				                  
				                  {$item.tjr}
				                  
				                  {else/}{if condition="$item.dl == 1"}无{else/}无{/if}{/if}</td>
				                  <td>
				                      {if condition="$item.khd eq 1"}
				                      电脑端
				                      {elseif condition="$item.khd eq 2"/}
				                      手机H5版
				                      {elseif condition="$item.khd eq 3"/}
				                      安卓App
				                      {elseif condition="$item.khd eq 4"/}
				                      苹果App
				                      {else}
				                      未知
				                      {/if}
				                  <td>
				                  {$item.je}
				                  
				                  </td>
				                  <td>{if condition="$item.open eq 0"}
				                      正常
				                     {elseif condition="$item.open eq 1"}
				                      冻结
				                     {/if}
				                   </td>
				                  <td>
				                  <p style="margin-bottom: 0px;">{$item.reg_time|date="Y-m-d H:i:s",###}</p>
				                  {$item.reg_ip}
				                  </td>
				                  <td>
				                  {if($item.login_num==0)}
										【从未】
				                  {else/}
				                     {if condition="$item.login_ip eq ''"}
				                     <p style="margin-bottom: 0px;">
				                      {$item.reg_time|date="Y-m-d H:i:s",###}
				                      </p>
				                     {$item.reg_ip}
				                     {else}
				                     <p style="margin-bottom: 0px;">
				                     {$item.login_time|date="Y-m-d H:i:s",###}
				                     </p>
				                    {$item.login_ip}
				                     {/if}
				                    {/if}
				                   </td>
				                   <td>{$item.login_num}&nbsp;次</td>
				                   
				                  <td>{$item.czzje}</td>
				                  
				                  <td>{$item.txzje}</td>
				                  <td>{$item.zcjje+$item.reg_je}</td>
				                  <td>{$item.czzje-$item.txzje}</td>
				                </tr>
				                {/volist}
				              </tbody>
				            </table>
				          </div>
				        </div>
				      </div>

  </div>
	            
	            
	            
	            
	        </div>
	       
    	</div>
  		
  	</div>
  	

  </div>

{/block}

{block name="js"}
  <script type="text/javascript" src="__SYSMET__/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
  <script type="text/javascript">
   $(function() {
      $('.skin-minimal input').iCheck({
        checkboxClass : 'icheckbox-blue',
        radioClass : 'iradio-blue',
        increaseArea : '20%'
      });
      $("#tab-system").Huitab({
        index : 0
      });
    });
    /*查看存取记录*/
    function checklist(title,url,w,h){
    	layer_show(title,url,w,h);
    }

function dlfp(user){
	
	$.ajax({	
		 type: "POST",
   	 	 url: "/admin/Member/us_select",
		 success: function(data){
			 var html = '';
			 $.each(data,function(k,v){
				 html += '<li '+(k>15 ? 'style="display:none;"' : '')+'>'+v.username+'</li>';
			 })
			 
			 var index = layer.open({
				  title:"代理分配",
				  offset: '100px;',
			  	  content:'<div style="overflow:hidden"><p style="float:left;margin-bottom:0;">上级代理：</p><input style="width: 131px;border: #000 solid 1px;height: 25px;" id="suglist" type="text" autocomplete="off"/></div>'
			  	  		+'<ul class="suglist" style="border: #000 solid 1px;width: 131px;margin-left: 42px;position: relative;top: -1px;display:none;">'
			  	  		+ html
						+'</ul>',
			  	  			
				  	yes: function(index, layero){
				  		var dl = $("#suglist").val();
				        window.location.href="/admin/member/us_fp?user="+user+"&dl="+dl;
				  }
			  });
			 $('#suglist').bind('input propertychange', function() {
					var val = $(this).val();
					$(".suglist li").css("display","none");
					if(val == ''){
						$(".suglist li:lt(16)").show();
					}else{
						$(".suglist li:contains("+val+")").show();
					}
					
				});
				
				$(".suglist").on('click','li',function(){
					var text = $(this).text();
					$("#suglist").val(text);
					$(".suglist").css('display','none');
				})
				$("#suglist").focus(function(){
					$(".suglist").css('display','block');
				})
		 }
	})
	
}

   
function open_zhixing_1(tid){
		$.ajax({	
			 type: "POST",
        	 url: "/admin/Member/CheckingRelevantInformation?uid="+tid,
			 success: function(data){
			 	document.getElementById('usid').value=data[0];
			 	document.getElementById('ip').value=data[1];
			 	$('#user_ids').html("查询【"+data[0]+"】的资料");
				 
					
			}
});
		
		$('#zhenzao').show();
		$('#zhixing_tuihui').show();
	
	 
}
function guanbi(){
		$('#zhenzao').hide();
		$('#zhixing_tuihui').hide();
	
	 
}

</script>
<script type="text/javascript">
	function fav_alert(title,url){
		var index = layer.open({
			type: 2,
			title: title,
			area: ['90%', '90%'],
			content: url
		});
	}
	</script>
  <script>
$(function(){
var username=$("#ss_sql").val();
var time1=$("#sDate1").val();
var time2=$("#sDate2").val();
 var id = $(this).find('option:selected').val();
var li=$(".am-pagination").children();
var us=$("#usid").val();
  for (i = 0; i < li.length; i++) {
        
        var url=li.eq(i).attr('href');
        if(url){
          li.eq(i).attr('href',url+'&ss_sql='+username+'&sDate1='+time1+'&sDate2='+time2+'&us='+us+"&limit="+id);
        }       
    }
  
  
  
  $("li").click(function () {
  	 $(this).addClass("active").siblings("li").removeClass("active");
//  $(".main").eq($(this).index()).addClass("selected").siblings("div").removeClass("selected");
  });
  
})
$("#code").on('change',function(){
    var username=$("#ss_sql").val();
    var time1=$("#sDate1").val();
    var time2=$("#sDate2").val();
    var id = $(this).find('option:selected').val();
    var us=$("#usid").val();
    window.location.href="/admin/member/us_list?ss_sql="+username+"&limit="+id+"&sDate1="+time1+"&sDate2="+time2+'&us='+us;
  })
</script>
{/block}
